package com.chmingx.springcloud.service.impl;

import com.chmingx.springcloud.dao.StorageDao;
import com.chmingx.springcloud.service.StorageService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

public class StorageServiceImpl implements StorageService {
    private static final Logger LOGGER = LoggerFactory.getLogger(StorageServiceImpl.class);

    @Autowired
    private StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer count) {
        LOGGER.info("----> storage service 中扣减库存开始");
        storageDao.decrease(productId, count);
        LOGGER.info("----> storage service中扣减库存开始");
    }
}
